/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Rodunu.Movies.Contracts
{
	/// <summary>
	/// Friends object for NHibernate mapped table 'Friends'.
	/// </summary>
	[Serializable]
	public class Friends : IIdentifier
	{
		#region Member Variables
		protected long _id;
		protected bool _block;
		protected bool _deletefriend;
		protected DateTime _dateadded;
		protected DateTime _lastmodified;
		#endregion
		#region Constructors
			
		public Friends() {}
					
		#endregion
		#region Public Properties
		public  virtual long Id
		{
			get { return _id; }
			set {_id= value; }
		}

        public virtual UserInfo UserInfo { get; set; }
	    public virtual UserInfo Friend { get; set; }
		public  virtual bool Block
		{
			get { return _block; }
			set {_block= value; }
		}
		public  virtual bool DeleteFriend
		{
			get { return _deletefriend; }
			set {_deletefriend= value; }
		}
		public  virtual DateTime DateAdded
		{
			get { return _dateadded; }
			set {_dateadded= value; }
		}
		public  virtual DateTime LastModified
		{
			get { return _lastmodified; }
			set {_lastmodified= value; }
		}

	    public virtual UserInfo DateAddedBy { get; set; }
	    public virtual UserInfo LastModifiedBy { get; set; }
	    public virtual bool Pending { get; set; }
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			Friends castObj = (Friends)obj;
			return ( castObj != null ) &&
			this._id == castObj.Id;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _id.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
